package com.hkts.naturalgasauthentication.management.service.impl;

import com.hkts.naturalgasauthentication.base.dao.ManagementBaseDao;
import com.hkts.naturalgasauthentication.management.dao.WebsiteInformationDao;
import com.hkts.naturalgasauthentication.management.dao.WebsiteParamsDao;
import com.hkts.naturalgasauthentication.management.entity.WebsiteInformation;
import com.hkts.naturalgasauthentication.management.entity.WebsiteParams;
import com.hkts.naturalgasauthentication.management.service.WebsiteParamsService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.domain.Example;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

/**
 * @ClassNameWebsiteParamsServiceImpl
 * @Description
 * @Author yck
 * @Date2021-02-18 15:48
 * @Version V1.0
 **/
@Service
@Transactional
public class WebsiteParamsServiceImpl implements WebsiteParamsService {
    @Autowired
    private WebsiteParamsDao websiteParamsDao;

    @Override
    public ManagementBaseDao getRepository() {
        return websiteParamsDao;
    }

    @Override
    public List<WebsiteParams> findByCondition(WebsiteParams websiteParams) {
        Example<WebsiteParams> example=Example.of(websiteParams);
        List<WebsiteParams> all = websiteParamsDao.findAll(example);
        return all;
    }
}
